import java.util.Scanner;

public class CaiShu {
    public static void main(String[] args) {
        /*int[] nums={8,4,6,3,23,344,12};
        double sum = 0;
        //循环输出数列的值
        for (int num:nums) {
            System.out.print(num+"\t");
            sum+=num;
        }
        System.out.println("\n和是："+sum);*/

        int[] nums={8,4,6,3,23,344,12};
        boolean flag=false;
        Scanner input=new Scanner(System.in);
        System.out.println("请输入一个数字");
        int a=input.nextInt();
        for (int i=0;i< nums.length;i++){
            if (nums[i]==a) {
                flag=true;
                break;
            }
        }
        if (flag){
            System.out.println("对了");
        }else
            System.out.println("错了");
    }
}
